package com.imooc.api.controller.article;

import com.imooc.grance.result.GraceJsonResult;
import com.imooc.pojo.bo.CommentReplyBO;
import com.imooc.pojo.bo.NewArticleBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.Map;

@Api(tags = "用户评论的Controller",value = "用户评论的Controller")
@RequestMapping("comment")
public interface CommentControllerApi {

    @ApiOperation(value = "用户评论",notes = "用户评论",httpMethod = "POST")
    @PostMapping("/createComment")
    public GraceJsonResult createComment(@RequestBody @Valid CommentReplyBO commentReplyBO) ;

    @ApiOperation(value = "文章的评论数",notes = "文章的评论数",httpMethod = "GET")
    @GetMapping("/counts")
    public GraceJsonResult counts(@RequestParam String articleId) ;

    @ApiOperation(value = "文章的评论数",notes = "文章的评论数",httpMethod = "GET")
    @GetMapping("/list")
    public GraceJsonResult list(@RequestParam String articleId,
                                @RequestParam Integer page,
                                @RequestParam Integer pageSize) ;

    @ApiOperation(value = "作家查看评论",notes = "作家查看评论",httpMethod = "POST")
    @PostMapping("/mng")
    public GraceJsonResult mng(@RequestParam String writerId,
                                @RequestParam Integer page,
                                @RequestParam Integer pageSize) ;

    @ApiOperation(value = "作家删除评论",notes = "作家删除评论",httpMethod = "POST")
    @PostMapping("/delete")
    public GraceJsonResult delete(@RequestParam String writerId,
                               @RequestParam String commentId) ;

}
